package top.vanchor.flexible.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author Ding
 * @since 2022-08-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class ResourcePath implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 资源主键id+url+cre/up（time）
     */
    @JsonProperty("rId")
    @TableId(value = "r_id", type = IdType.AUTO)
    private Integer rId;

    /**
     * 创建时间
     */
    @JsonProperty("createTime")
    @TableField(value = "create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern ="yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date createTime;

    /**
     * 更新时间
     */
    @JsonProperty("updateTime")
    @TableField(value = "update_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern ="yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date updateTime;

    /**
     * 资源路径
     */
    @JsonProperty("url")
    @TableField(value = "url")
    private String url;


}
